package com.szosen.util;

import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;

public class VisitContants {
	public static class GXY {
		public static final String[] items = new String[] { "吲达帕胺(口服常释剂型)",
				"吲达帕胺(缓释控释剂型)", "尼群地平(口服常释剂型)", "硝苯地平(口服常释剂型)", "氨氯地平(口服常释剂型)",
				"噻吗洛尔(滴眼剂)", "可乐定(滴眼剂)", "倍他洛尔(滴眼剂)", "肼屈嗪(注射剂",
				"乌拉地尔(缓释控释剂型)", "乌拉地尔(注射剂", "卡托普利(口服常释剂型)", "贝那普利(口服常释剂型)",
				"福辛普利(口服常释剂型)", "雷米普利(口服常释剂型)", "咪达普利(口服常释剂型)", "培哚普利(口服常释剂型)",
				"西拉普利(口服常释剂型)", "依那普利(口服常释剂型)", "厄贝沙坦(口服常释剂型)", "厄贝沙坦(缓释控释剂型)",
				"坎地沙坦(口服常释剂型)", "氯沙坦钾(口服常释剂型)", "替米沙坦(口服常释剂型)", "缬沙坦(口服常释剂型)",
				"硝普钠(注射剂)", "肼屈嗪(口服常释剂型)", "米诺地尔(口服常释剂型)", "氢氯噻嗪(口服常释剂型)",
				"非洛地平(口服常释剂型)", "非洛地平(缓释控释剂型)", "拉西地平(口服常释剂型)", "尼卡地平(口服常释剂型)",
				"尼卡地平(缓释控释剂型)", "尼卡地平(注射剂)", "硝苯地平(缓释控释剂型)", "尼索地平(口服常释剂型)",
				"尼索地平(缓释控释剂型)", "阿替洛尔(口服常释剂型)", "普萘洛尔(口服常释剂型)", "阿罗洛尔(口服常释剂型)",
				"比索洛尔(口服常释剂型)", "拉贝洛尔(口服常释剂型)", "普萘洛尔(缓释控释剂型)", "普萘洛尔(注射剂)",
				"利血平(注射剂)", "哌唑嗪(口服常释剂型)", "甲基多巴(口服常释剂型)", "可乐定(口服常释剂型)",
				"利血平(口服常释剂型)", "乌拉地尔(口服常释剂型)", "特拉唑嗪(口服常释剂型)", "多沙唑嗪(口服常释剂型)",
				"多沙唑嗪(缓释控释剂型)", "复方羚角降压片", "其他药物", "通心络胶囊", "复方丹参片", "速尿片",
				"螺内酯", "氢氯噻嗪", "双嘧达莫", "厄贝沙坦片", "辛伐他汀片", "哌唑嗪", "倍他乐克",
				"缬沙坦胶囊", "酒石酸美托洛尔控释片（立君宁）", "硝苯地平缓释片", "牛黄降压丸（胶囊、片）", "清肝降压胶囊",
				"清脑降压颗粒（胶囊、片）", "珍菊降压片", "山绿茶降压片", "阿司匹林肠溶片", "血脂康", "尼莫地平",
				"卡托普利", "地奥心血康", "脑络通胶囊", "赖诺普利(口服常释剂型)", "羚角降压片", "西尼地平胶囊",
				"丹参滴丸", "苯磺酸氨氯地平分散片", "氯沙坦钾氢氯噻嗪片", "拉西地平分散片", "缬沙坦分散片",
				"马来酸依那普利片", "厄贝沙坦氢氯噻嗪分散片", "厄贝沙坦胶囊", "厄贝沙坦片", "硫酸氯吡格雷片",
				"阿托伐他汀钙片", "酒石酸美托洛尔片", "马来酸比索洛尔片", "单硝酸异山梨酯（缓释）片", "银丹心脑软通胶囊",
				"硝苯地平片", "苯磺酸左旋氨氯地平", "非洛地平", "尼群地平", "贝那普利", "美托洛尔", "普萘洛尔",
				"呋塞米", "氨氯地平" };
		public static final LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
		static {
			map.put("x16030000927-0", "吲达帕胺(口服常释剂型)");
			map.put("x16030000927-1", "吲达帕胺(缓释控释剂型)");
			map.put("x16040000928", "尼群地平(口服常释剂型)");
			map.put("x16040000931", "硝苯地平(口服常释剂型)");
			map.put("x16040000932", "氨氯地平(口服常释剂型)");
			map.put("x20020201237", "噻吗洛尔(滴眼剂)");
			map.put("x20020201241", "可乐定(滴眼剂)");
			map.put("x20020401252", "倍他洛尔(滴眼剂)");
			map.put("x20050301326", "肼屈嗪(注射剂");
			map.put("x16060000966-1", "乌拉地尔(缓释控释剂型)");
			map.put("x16060000967", "乌拉地尔(注射剂");
			map.put("x16070000968", "卡托普利(口服常释剂型)");
			map.put("x16070000969", "贝那普利(口服常释剂型)");
			map.put("x16070000970", "福辛普利(口服常释剂型)");
			map.put("x16070000972", "雷米普利(口服常释剂型)");
			map.put("x16070000973", "咪达普利(口服常释剂型)");
			map.put("x16070000974", "培哚普利(口服常释剂型)");
			map.put("x16070000975", "西拉普利(口服常释剂型)");
			map.put("x16070000976", "依那普利(口服常释剂型)");
			map.put("x16080000978-0", "厄贝沙坦(口服常释剂型)");
			map.put("x16080000978-1", "厄贝沙坦(缓释控释剂型)");
			map.put("x16080000980", "坎地沙坦(口服常释剂型)");
			map.put("x16080000981", "氯沙坦钾(口服常释剂型)");
			map.put("x16080000983", "替米沙坦(口服常释剂型)");
			map.put("x16080000984", "缬沙坦(口服常释剂型)");
			map.put("x16090000988", "硝普钠(注射剂)");
			map.put("x16090001001", "肼屈嗪(口服常释剂型)");
			map.put("x16090001002", "米诺地尔(口服常释剂型)");
			map.put("x17010001043", "氢氯噻嗪(口服常释剂型)");
			map.put("x16040000935-0", "非洛地平(口服常释剂型)");
			map.put("x16040000935-1", "非洛地平(缓释控释剂型)");
			map.put("x16040000936", "拉西地平(口服常释剂型)");
			map.put("x16040000939-0", "尼卡地平(口服常释剂型)");
			map.put("x16040000939-1", "尼卡地平(缓释控释剂型)");
			map.put("x16040000940", "尼卡地平(注射剂)");
			map.put("x16040000942", "硝苯地平(缓释控释剂型)");
			map.put("x16040000944-0", "尼索地平(口服常释剂型)");
			map.put("x16040000944-1", "尼索地平(缓释控释剂型)");
			map.put("x16050000945", "阿替洛尔(口服常释剂型)");
			map.put("x16050000948", "普萘洛尔(口服常释剂型)");
			map.put("x16050000949", "阿罗洛尔(口服常释剂型)");
			map.put("x16050000950", "比索洛尔(口服常释剂型)");
			map.put("x16050000952", "拉贝洛尔(口服常释剂型)");
			map.put("x16050000953", "普萘洛尔(缓释控释剂型)");
			map.put("x16050000954", "普萘洛尔(注射剂)");
			map.put("x16060000958", "利血平(注射剂)");
			map.put("x16060000959", "哌唑嗪(口服常释剂型)");
			map.put("x16060000962", "甲基多巴(口服常释剂型)");
			map.put("x16060000964", "可乐定(口服常释剂型)");
			map.put("x16060000965", "利血平(口服常释剂型)");
			map.put("x16060000966-0", "乌拉地尔(口服常释剂型)");
			map.put("x17030001051", "特拉唑嗪(口服常释剂型)");
			map.put("x17030001054-0", "多沙唑嗪(口服常释剂型)");
			map.put("x17030001054-1", "多沙唑嗪(缓释控释剂型)");
			map.put("z01140080008", "复方羚角降压片");
			map.put("109999999999", "其他药物");
			map.put("z01080200308", "通心络胶囊");
			map.put("z01080200309", "复方丹参片");
			map.put("z01080200310", "速尿片");
			map.put("z01080200311", "螺内酯");
			map.put("z01080200312", "氢氯噻嗪");
			map.put("z01080200313", "双嘧达莫");
			map.put("z01080200314", "厄贝沙坦片");
			map.put("z01080200315", "辛伐他汀片");
			map.put("z01080200316", "哌唑嗪");
			map.put("z01080200317", "倍他乐克");
			map.put("z01080200318", "缬沙坦胶囊");
			map.put("z01080200319", "酒石酸美托洛尔控释片（立君宁）");
			map.put("z01080200330", "硝苯地平缓释片");
			map.put("z01140200519", "牛黄降压丸（胶囊、片）");
			map.put("z01140200523", "清肝降压胶囊");
			map.put("z01140200524", "清脑降压颗粒（胶囊、片）");
			map.put("z01140200529", "珍菊降压片");
			map.put("z01140300534", "山绿茶降压片");
			map.put("z01080200302", "阿司匹林肠溶片");
			map.put("z01080200303", "血脂康");
			map.put("z01080200304", "尼莫地平");
			map.put("z01080200305", "卡托普利");
			map.put("z01080200306", "地奥心血康");
			map.put("z01080200307", "脑络通胶囊");
			map.put("x16070000971", "赖诺普利(口服常释剂型)");
			map.put("z00000000001", "羚角降压片");
			map.put("z01080200479", "西尼地平胶囊");
			map.put("z01080200480", "丹参滴丸");
			map.put("z01080200481", "苯磺酸氨氯地平分散片");
			map.put("z01080200482", "氯沙坦钾氢氯噻嗪片");
			map.put("z01080200483", "拉西地平分散片");
			map.put("z01080200484", "缬沙坦分散片");
			map.put("z01080200485", "马来酸依那普利片");
			map.put("z01080200486", "厄贝沙坦氢氯噻嗪分散片");
			map.put("z01080200487", "厄贝沙坦胶囊");
			map.put("z01080200488", "厄贝沙坦片");
			map.put("z01080200489", "硫酸氯吡格雷片");
			map.put("z01080200490", "阿托伐他汀钙片");
			map.put("z01080200491", "酒石酸美托洛尔片");
			map.put("z01080200492", "马来酸比索洛尔片");
			map.put("z01080200493", "单硝酸异山梨酯（缓释）片");
			map.put("z01080200494", "银丹心脑软通胶囊");
			map.put("z01080200331", "硝苯地平片");
			map.put("z01080200332", "苯磺酸左旋氨氯地平");
			map.put("z01080200333", "非洛地平");
			map.put("z01080200334", "尼群地平");
			map.put("z01080200335", "贝那普利");
			map.put("z01080200336", "美托洛尔");
			map.put("z01080200337", "普萘洛尔");
			map.put("z01080200338", "呋塞米");
			map.put("z01080200339", "氨氯地平");

		}

	}

	public static String getGXYCodeByYaowuName(String yaowu) {
		return getKeyByValue(GXY.map, yaowu);
	}

	public static String getTNBCodeByYaowuName(String yaowu) {
		return getKeyByValue(TNB.map, yaowu);
	}

	public static class TNB {
		public static final String[] items = new String[] { "氨氯地平",
				"伏格列波糖(口服常释剂型)", "二甲双胍(缓释控释剂型)", "二甲双胍(口服常释剂型)",
				"阿卡波糖(口服常释剂型)", "吡格列酮(口服常释剂型)", "罗格列酮(口服常释剂型)", "门冬胰岛素(注射剂)",
				"赖脯胰岛素(注射剂)", "格列美脲(口服常释剂型)", "格列齐特(口服常释剂型)", "格列齐特(缓释控释剂型)",
				"那格列奈(口服常释剂型)", "瑞格列奈(口服常释剂型)", "格列吡嗪(口服常释剂型)", "格列喹酮(口服常释剂型)",
				"其他药物", "阿卡波糖胶囊", "格列齐特片", "格列美脲胶囊", "二甲双胍", "消渴丸", "罗格列酮",
				"诺和锐", "诺和平", "诺和灵", "优泌乐", "依那普利", "速效救心丸", "复方丹参滴丸",
				"格列齐特缓释片", "格列齐特缓释胶囊", "盐酸二甲双胍肠溶片（缓释片）", "伏格列波糖分散片",
				"盐酸吡格列酮分散片", "格列喹酮片", "甘精胰岛素注射液" };
		public static final LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
		static {
			map.put("z01080200339", "氨氯地平");
			map.put("x08080000472", "伏格列波糖(口服常释剂型)");
			map.put("x08050220444", "二甲双胍(缓释控释剂型)");
			map.put("x08050220443", "二甲双胍(口服常释剂型)");
			map.put("x08050230445", "阿卡波糖(口服常释剂型)");
			map.put("x08050240446", "吡格列酮(口服常释剂型)");
			map.put("x08050240447", "罗格列酮(口服常释剂型)");
			map.put("x08050100433", "门冬胰岛素(注射剂)");
			map.put("x08050100434", "赖脯胰岛素(注射剂)");
			map.put("x08050210438", "格列美脲(口服常释剂型)");
			map.put("x08050210439-0", "格列齐特(口服常释剂型)");
			map.put("x08050210439-1", "格列齐特(缓释控释剂型)");
			map.put("x08050210440", "那格列奈(口服常释剂型)");
			map.put("x08050210441", "瑞格列奈(口服常释剂型)");
			map.put("x08050210436-0", "格列吡嗪(口服常释剂型)");
			map.put("x08050210437", "格列喹酮(口服常释剂型)");
			map.put("109999999998", "其他药物");
			map.put("z01080200320", "阿卡波糖胶囊");
			map.put("z01080200321", "格列齐特片");
			map.put("z01080200322", "格列美脲胶囊");
			map.put("z01080200470", "二甲双胍");
			map.put("z01080200471", "消渴丸");
			map.put("z01080200472", "罗格列酮");
			map.put("z01080200473", "诺和锐");
			map.put("z01080200474", "诺和平");
			map.put("z01080200475", "诺和灵");
			map.put("z01080200476", "优泌乐");
			map.put("z01080200477", "依那普利");
			map.put("z01080200478", "速效救心丸");
			map.put("z01080200479", "复方丹参滴丸");
			map.put("x01080200480", "格列齐特缓释片");
			map.put("x01080200481", "格列齐特缓释胶囊");
			map.put("x01080200482", "盐酸二甲双胍肠溶片（缓释片）");
			map.put("x01080200483", "伏格列波糖分散片");
			map.put("x01080200484", "盐酸吡格列酮分散片");
			map.put("x01080200485", "格列喹酮片");
			map.put("x01080200486", "甘精胰岛素注射液");
		}
	}

	private static String getKeyByValue(LinkedHashMap<String, String> map,
			String value) {
		Iterator iter = map.entrySet().iterator();
		while (iter.hasNext()) {
			Map.Entry entry = (Map.Entry) iter.next();
			Object key = entry.getKey();
			Object val = entry.getValue();
			if (val.equals(value)) {
				return (String) key;
			}
		}
		return "";
	}
}
